﻿
@{
    ViewData["Title"] = "OnlineConfig";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div id="dbConfig"> 
    <el-form ref="form" :model="form" label-width="80px">
        <el-row :gutter="24">
            <el-col :span="24">
                <el-form-item> 
                    <el-button v-on:click="Back()" size="mini">返回</el-button> 
                </el-form-item>
            </el-col>
        </el-row>
        <el-row :gutter="24">
            <el-col :span="24">
                <el-form-item label="配置信息" required size="mini">
                    <div class="el-textarea">
                        <textarea placeholder="请输入配置信息" v-model="form.jsonSettings" style="height:600px" class="el-textarea__inner"></textarea>
                    </div>
                </el-form-item>
            </el-col>
        </el-row>
    </el-form>

</div>

<script>
    new Vue({
        el: '#dbConfig',
        data() {
            return { 
                projectId: getQueryString("projectId") || 0,
                envId: getQueryString("envId") || 0,
                form: { 
                    jsonSettings: "" 
                }
            }
        },
        created() { 
            this.GetOnlineConfigById();
             
        },
        methods: { 
            GetOnlineConfigById() {
                var _this = this;
                _this.$get("@Url.Action("GetOnlineConfigById", "Project")?ProjectId=" + parseInt(_this.projectId) + "&EnvId=" + parseInt(_this.envId)).then((res) => { 
                    _this.form.jsonSettings = res;
                });
            }, 
            Back() {
                this.$back();
            },
        }
    });
</script>
